/**
 * @Title: IAnnounceMapper.java
 * @Package com.zll.ccp.mapper
 * @author zhanglinlu
 * @date 2019年5月18日 下午5:14:54
 */
package com.zll.ccp.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.zll.ccp.model.Announce;

/**
 * @ClassName: IAnnounceMapper
 * @Description: 校园公告
 * @author zhanglinlu
 * @date 2019年5月18日 下午5:14:54
 * 
 */
public interface IAnnounceMapper {

    /**
     * @Title: getAnnounceById
     * @Description: 根据id获取 公告
     * @param id 公告id
     * @return
     */
    public Announce getAnnounceById(String id);

    /**
     * @Title: addAnnounce
     * @Description: 增加公告
     * @param announce 公告
     */
    public void addAnnounce(Announce announce);

    /**
     * @Title: updateAnnounce
     * @Description: 修改公告
     * @param announce 公告
     */
    public void updateAnnounce(Announce announce);

    /**
     * @Title: getAnnouncesTop
     * @Description: 获取按时间倒序top5
     * @return
     */
    public List<Map<String, Object>> getAnnouncesTop();

    /**
     * @Title: getAnnouncesByFilter
     * @Description: 根据筛选条件获取公告集合
     * @param pTitle 标题
     * @param pCT 创建日期
     * @return
     */
    public List<Map<String, Object>> getAnnouncesByFilter(@Param("pTitle") String pTitle, @Param("pCT") String pCT);

    /**
     * @Title: deleteAnnounce
     * @Description: 删除公告
     * @param id 主键
     */
    public void deleteAnnounce(String id);
}
